package cn.hxzy.entity;

import java.math.BigDecimal;

import cn.hxzy.config.BigDecimalFormat;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.Version;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author yuankan.WANG
 * @since 2022-01-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Train implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "train_id", type = IdType.AUTO)
    private Integer trainId;

    private String trainName;

    private String startStation;

    private String endStation;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    private String totalTime;

    private Integer totalSite;
    @JsonSerialize(using = BigDecimalFormat.class)
    private BigDecimal money;

    private Integer surplusSite;

    private Integer status;
    @Version
    private Integer version;


}
